----------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\jar68\OneDrive\Ongoing Work\Party Cues and Suspicion Paper\Final Datavserse\Online Appendix A\an
> es_demographics_log.log
  log type:  text
 opened on:  25 Jun 2021, 10:36:52

. use "anes_timeseries_2016.dta"

. 
. set more off

. 
. ***Survey Weights
. svyset [pweight=V160102], strata(V160201) psu(V160202)

      pweight: V160102
          VCE: linearized
  Single unit: missing
     Strata 1: V160201
         SU 1: V160202
        FPC 1: <zero>

. 
. 
. ***Gender
. recode V161342 (1=0 "male") (2=1 "female") (else=.), gen(gender)
(4271 differences between V161342 and gender)

. svy: tab gender
(running tabulate on estimation sample)

Number of strata   =       132                  Number of obs     =      4,219
Number of PSUs     =       265                  Population size   = 3,607.8466
                                                Design df         =        133

----------------------
RECODE of |
V161342   |
(PRE FTF  |
CASI /    |
WEB: R    |
self-iden |
tified    |
gender)   | proportion
----------+-----------
     male |      .4803
   female |      .5197
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Age
. recode V161267 (-9 -8 =.), gen(age)
(121 differences between V161267 and age)

. gen age_cat = .
(4,271 missing values generated)

.         replace age_cat = 1 if age >=18 & age <= 24
(329 real changes made)

.         replace age_cat = 2 if age >=25 & age <= 34
(710 real changes made)

.         replace age_cat = 3 if age >=35 & age <= 44
(655 real changes made)

.         replace age_cat = 4 if age >=45 & age <= 54
(688 real changes made)

.         replace age_cat = 5 if age >=55 & age <= 64
(817 real changes made)

.         replace age_cat = 6 if age >=65
(1,072 real changes made)

. 
. svy: mean age
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =     132        Number of obs   =      4,175
Number of PSUs   =     265        Population size = 3,573.6286
                                  Design df       =        133

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         age |   47.37432   .3921105      46.59874     48.1499
--------------------------------------------------------------

. svy: tab age_cat
(running tabulate on estimation sample)

Number of strata   =       132                  Number of obs     =      4,271
Number of PSUs     =       265                  Population size   = 3,649.0009
                                                Design df         =        133

----------------------
  age_cat | proportion
----------+-----------
        1 |      .1198
        2 |      .1653
        3 |      .1452
        4 |      .1727
        5 |      .1948
        6 |      .2023
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Education
. recode V161270 (-9 =.) (1 2 3 4 5 6 7 8 = 1 "No HS") ///
>                    (9 = 2 "HS Grad") (10 11 12 = 3 "Some College") ///
>                            (13 = 4 "BA") (14 15 16 = 5 "Post-BA") (90 95=.), gen(educ)
(4270 differences between V161270 and educ)

.                            
. svy: tab educ
(running tabulate on estimation sample)

Number of strata   =       132                  Number of obs     =      4,227
Number of PSUs     =       265                  Population size   = 3,624.3803
                                                Design df         =        133

----------------------
RECODE of |
V161270   |
(PRE:     |
Highest   |
level of  |
Education |
)         | proportion
----------+-----------
    No HS |       .091
  HS Grad |      .2886
 Some Col |      .3015
       BA |      .1876
  Post-BA |      .1312
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Race/Ethnicity
. recode V161310x (-9=.) (1=1 "White" ) (2=2 "Black") (3=3 "Asian") (5=4 "Hispanic")  (4 6 = 5 "Other"), gen(race_eth)
(687 differences between V161310x and race_eth)

. svy: tab race_eth
(running tabulate on estimation sample)

Number of strata   =       132                  Number of obs     =      4,238
Number of PSUs     =       265                  Population size   = 3,629.6061
                                                Design df         =        133

----------------------
RECODE of |
V161310x  |
(PRE:     |
SUMMARY - |
R         |
self-iden |
tified    |
race)     | proportion
----------+-----------
    White |      .6971
    Black |      .1099
    Asian |       .028
 Hispanic |      .1191
    Other |      .0459
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Household Income
. recode V161361x (-9 -5 =.), gen(income)
(202 differences between V161361x and income)

. 
. summ income, detail

      RECODE of V161361x (PRE FTF CASI/WEB: Pre income
                          summary)
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            3              1       Obs               4,069
25%            9              1       Sum of Wgt.       4,069

50%           16                      Mean           15.38683
                        Largest       Std. Dev.      8.080488
75%           22             28
90%           26             28       Variance       65.29428
95%           27             28       Skewness      -.2525751
99%           28             28       Kurtosis       1.943775

. 
. ***PID
. recode V161158x (-9 -8 =.), gen(pid)
(23 differences between V161158x and pid)

. recode pid (1 2 3 = 1 "Democrat" ) (4=2 "Independent") (5 6 7 = 3 "Republican"), gen(pid_3)
(3358 differences between pid and pid_3)

. 
. svy: mean pid
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =     132        Number of obs   =      4,253
Number of PSUs   =     265        Population size = 3,626.3771
                                  Design df       =        133

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         pid |   3.799055   .0433797      3.713252    3.884859
--------------------------------------------------------------

. svy: tab pid_3
(running tabulate on estimation sample)

Number of strata   =       132                  Number of obs     =      4,248
Number of PSUs     =       265                  Population size   = 3,626.3771
                                                Design df         =        133

----------------------
RECODE of |
pid       |
(RECODE   |
of        |
V161158x  |
(PRE:     |
SUMMARY - |
Party     |
ID))      | proportion
----------+-----------
 Democrat |      .4668
 Independ |      .1382
 Republic |      .3949
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. 
. ***Symbolic Ideology
. recode V161126 (-9 -8  99 =.), gen(ideol)
(967 differences between V161126 and ideol)

. recode ideol (1 2 3 = 1 "Liberal" ) (4 = 2 "Moderate") (5 6 7 = 3 "Liberal"), gen(ideol_3)
(3158 differences between ideol and ideol_3)

. 
. svy: mean ideol
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =     132        Number of obs   =      3,502
Number of PSUs   =     265        Population size = 2,752.0638
                                  Design df       =        133

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
       ideol |   4.149197    .034719      4.080524     4.21787
--------------------------------------------------------------

. svy: tab ideol_3
(running tabulate on estimation sample)

Number of strata   =       132                  Number of obs     =      3,304
Number of PSUs     =       265                  Population size   = 2,752.0638
                                                Design df         =        133

----------------------
RECODE of |
ideol     |
(RECODE   |
of        |
V161126   |
(PRE: 7pt |
scale     |
Liberal   |
conservat |
ive       |
self-pla  | proportion
----------+-----------
  Liberal |       .321
 Moderate |      .2687
  Liberal |      .4103
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. 
. 
. /******************************
> ANES 2018
> *******************************/
. 
. clear

. use anes_pilot_2018.dta

. set more off

. 
. ***Survey Weights
. svyset [pweight=weight]

      pweight: weight
          VCE: linearized
  Single unit: missing
     Strata 1: <one>
         SU 1: <observations>
        FPC 1: <zero>

. 
. ***Gender
. svy: tab gender
(running tabulate on estimation sample)

Number of strata   =         1                  Number of obs     =      2,500
Number of PSUs     =     2,500                  Population size   =      2,500
                                                Design df         =      2,499

----------------------
gender.   |
profile   |
data:     |
Gender    | proportion
----------+-----------
     Male |      .4877
   Female |      .5123
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Age
. gen age = 2018 - birthyr

. 
. gen age_cat = .
(2,500 missing values generated)

.         replace age_cat = 1 if age >=18 & age <= 24
(209 real changes made)

.         replace age_cat = 2 if age >=25 & age <= 34
(412 real changes made)

.         replace age_cat = 3 if age >=35 & age <= 44
(349 real changes made)

.         replace age_cat = 4 if age >=45 & age <= 54
(451 real changes made)

.         replace age_cat = 5 if age >=55 & age <= 64
(574 real changes made)

.         replace age_cat = 6 if age >=65
(505 real changes made)

. 
. svy: mean age
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      2,500
Number of PSUs   =   2,500        Population size =      2,500
                                  Design df       =      2,499

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         age |   46.16291   .4694186      45.24242     47.0834
--------------------------------------------------------------

. svy: tab age_cat
(running tabulate on estimation sample)

Number of strata   =         1                  Number of obs     =      2,500
Number of PSUs     =     2,500                  Population size   =      2,500
                                                Design df         =      2,499

----------------------
  age_cat | proportion
----------+-----------
        1 |      .1211
        2 |      .1992
        3 |      .1571
        4 |      .1821
        5 |      .1627
        6 |      .1778
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Education
. recode educ (-7 -1 =.) (1=1) (2=2) (3 4 =3) (5=4) (6=5), gen(educ1)
(1158 differences between educ and educ1)

. svy: tab educ1
(running tabulate on estimation sample)

Number of strata   =         1                  Number of obs     =      2,500
Number of PSUs     =     2,500                  Population size   =      2,500
                                                Design df         =      2,499

----------------------
RECODE of |
educ      |
(educ.    |
profile   |
data:     |
Education |
)         | proportion
----------+-----------
        1 |      .1272
        2 |       .275
        3 |      .3098
        4 |      .1822
        5 |      .1057
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Race/Ethnicity
. recode race (-7 -1 =.) (1=1 "White") (2=2 "Black") (3=3 "Hispanic" ) (4 = 4 "Asian") (5 6 7 = 5 "Other"), gen(race1)
(85 differences between race and race1)

. svy: tab race1
(running tabulate on estimation sample)

Number of strata   =         1                  Number of obs     =      2,499
Number of PSUs     =     2,499                  Population size   = 2,499.7824
                                                Design df         =      2,498

----------------------
RECODE of |
race      |
(race.    |
profile   |
data:     |
responden |
t race)   | proportion
----------+-----------
    White |      .6396
    Black |      .1203
 Hispanic |      .1591
    Asian |      .0531
    Other |      .0278
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. ***Household Income
. recode faminc_new (-7 -1 97 =.), gen(income)
(314 differences between faminc_new and income)

. 
. summ income, detail

       RECODE of faminc_new (faminc_new. profile data:
                       Family income)
-------------------------------------------------------------
      Percentiles      Smallest
 1%            1              1
 5%            1              1
10%            2              1       Obs               2,186
25%            3              1       Sum of Wgt.       2,186

50%            5                      Mean           6.017383
                        Largest       Std. Dev.      3.520151
75%            9             16
90%           11             16       Variance       12.39146
95%           12             16       Skewness       .4387566
99%           15             16       Kurtosis       2.300346

. 
. ***PID
. recode pid7x (-7 =.), gen(pid)
(98 differences between pid7x and pid)

. recode pid (1 2 3 = 1 "Democrat" ) (4=2 "Independent") (5 6 7 = 3 "Republican"), gen(pid_3)
(1821 differences between pid and pid_3)

. 
. svy: mean pid
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      2,402
Number of PSUs   =   2,402        Population size = 2,351.4139
                                  Design df       =      2,401

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         pid |   3.735452   .0567999       3.62407    3.846834
--------------------------------------------------------------

. svy: tab pid_3
(running tabulate on estimation sample)

Number of strata   =         1                  Number of obs     =      2,402
Number of PSUs     =     2,402                  Population size   = 2,351.4139
                                                Design df         =      2,401

----------------------
RECODE of |
pid       |
(RECODE   |
of pid7x  |
(Party ID |
summary)) | proportion
----------+-----------
 Democrat |      .4613
 Independ |      .1833
 Republic |      .3553
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. 
. ***Symbolic Ideology
. recode lcself (-7 -1 =.), gen(ideol)
(7 differences between lcself and ideol)

. recode ideol (1 2 3 = 1 "Liberal" ) (4 = 2 "Moderate") (5 6 7 = 3 "Liberal"), gen(ideol_3)
(2125 differences between ideol and ideol_3)

. 
. svy: mean ideol
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      2,493
Number of PSUs   =   2,493        Population size = 2,491.4088
                                  Design df       =      2,492

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
       ideol |   3.936817   .0486755      3.841369    4.032266
--------------------------------------------------------------

. svy: tab ideol_3
(running tabulate on estimation sample)

Number of strata   =         1                  Number of obs     =      2,493
Number of PSUs     =     2,493                  Population size   = 2,491.4088
                                                Design df         =      2,492

----------------------
RECODE of |
ideol     |
(RECODE   |
of lcself |
(When it  |
comes to  |
politics, |
would you |
describe  | proportion
----------+-----------
  Liberal |      .3563
 Moderate |       .306
  Liberal |      .3378
          | 
    Total |          1
----------------------
  Key:  proportion  =  cell proportion

. 
. 
. log close
      name:  <unnamed>
       log:  C:\Users\jar68\OneDrive\Ongoing Work\Party Cues and Suspicion Paper\Final Datavserse\Online Appendix A\an
> es_demographics_log.log
  log type:  text
 closed on:  25 Jun 2021, 10:36:54
----------------------------------------------------------------------------------------------------------------------
